﻿! door_panel_O /modified by VL 3/1/94/
! internal macro: door_int_frame
! a=width, b=height, c=thickness, d= panel frame width,
! e=fill material, f=internal frame width,
! g=horizontal n. of strips, h=vertical n. of strips

i= (a-(g+1)*d)/g      ! horiz size of panes
j= (b-(h+1)*d)/h      ! vertical size of panes
if i<d or j<d then 100

addz c/4
for v=0 to g-1
    for w=0 to h-1
        put (v+1)*d+v*i, (w+1)*d+w*j,15,
              (v+1)*(d+i), (w+1)*d+w*j,15,
              (v+1)*(d+i), (w+1)*(d+j),15,
              (v+1)*d+v*i, (w+1)*(d+j),15,
              (v+1)*d+v*i, (w+1)*d+w*j,-1      
        add (v+1)*d+v*i, (w+1)*d+w*j,0
        call  door_int_frame95 i,j, c/2, f
       del 1
    next w
next v
del 1
prism_ 5+nsp/3,c,
0,0,15,
0,b,15,
a,b,15,
a,0,15,
0,0,-1,
get (nsp)
if e>0 then 10
end
10:
material e
addz c/2-0.002
  for v=0 to g-1
    for w=0 to h-1
          add (v+1)*d+v*i+f, (w+1)*d+w*j+f, 0
          block i-2*f, j-2*f, 0.004
          del 1
     next w
  next v
end
100: Print "too many panes"
